package com.ala4.oxcafe.controller;

import com.ala4.oxcafe.domain.R;
import com.ala4.oxcafe.dto.BackendHomeDTO;
import com.ala4.oxcafe.service.impl.BackendHomeService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author PING
 * @version 1.0.0
 * @date 2025/8/18 11:30
 */
@RestController
@RequestMapping("/backend-home")
@AllArgsConstructor
@Tag(name = "后台首页信息", description = "用于获取后台首页的信息")
public class HomeController {

    private final BackendHomeService backendHomeService;

    @Operation(summary = "后台首页数据")
    @GetMapping("/info")
    public R<BackendHomeDTO> info() {
        return R.ok(backendHomeService.backendHomeInfo());
    }


}
